package com.jh.paymentchannel.business.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

public class JuHeAPIRealnameAuthService {
	private static final Logger LOG = LoggerFactory.getLogger(JuHeAPIRealnameAuthService.class);

	/**聚合实名认证*/
	public static String realNameAuth(String idcard, String realname,String jhKey){

		String url =  "http://op.juhe.cn/idcard/query?idcard="+idcard+"&realname="+realname+"&key="+jhKey;

		RestTemplate restTemplate=new RestTemplate();
		ResponseEntity<String> resultStr = restTemplate.exchange(url,HttpMethod.GET, null, String.class);
		LOG.info("=====resultStr:"+resultStr);
		String responseCode = resultStr.getBody();
		return responseCode;
	}

}
